/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.myapp.c0910g.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author BachLe
 */
@Entity
@Table(name = "PaymentDetails")
@NamedQueries({
    @NamedQuery(name = "PaymentDetails.findAll", query = "SELECT p FROM PaymentDetails p"),
    @NamedQuery(name = "PaymentDetails.findByPaymentDetailID", query = "SELECT p FROM PaymentDetails p WHERE p.paymentDetailID = :paymentDetailID"),
    @NamedQuery(name = "PaymentDetails.findByPDStartDate", query = "SELECT p FROM PaymentDetails p WHERE p.pDStartDate = :pDStartDate"),
    @NamedQuery(name = "PaymentDetails.findByPDEndDate", query = "SELECT p FROM PaymentDetails p WHERE p.pDEndDate = :pDEndDate"),
    @NamedQuery(name = "PaymentDetails.findByPDMoney", query = "SELECT p FROM PaymentDetails p WHERE p.pDMoney = :pDMoney"),
    @NamedQuery(name = "PaymentDetails.findByPDStatus", query = "SELECT p FROM PaymentDetails p WHERE p.pDStatus = :pDStatus")})
public class PaymentDetails implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "PaymentDetailID")
    private Integer paymentDetailID;
    @Column(name = "PDStartDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date pDStartDate;
    @Column(name = "PDEndDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date pDEndDate;
    @Column(name = "PDMoney")
    private Integer pDMoney;
    @Column(name = "PDStatus")
    private Boolean pDStatus;
    @JoinColumn(name = "URCID", referencedColumnName = "URCID")
    @ManyToOne
    private UserRadioCab userRadioCab;

    public PaymentDetails() {
    }

    public PaymentDetails(Integer paymentDetailID) {
        this.paymentDetailID = paymentDetailID;
    }

    public Integer getPaymentDetailID() {
        return paymentDetailID;
    }

    public void setPaymentDetailID(Integer paymentDetailID) {
        this.paymentDetailID = paymentDetailID;
    }

    public Date getPDStartDate() {
        return pDStartDate;
    }

    public void setPDStartDate(Date pDStartDate) {
        this.pDStartDate = pDStartDate;
    }

    public Date getPDEndDate() {
        return pDEndDate;
    }

    public void setPDEndDate(Date pDEndDate) {
        this.pDEndDate = pDEndDate;
    }

    public Integer getPDMoney() {
        return pDMoney;
    }

    public void setPDMoney(Integer pDMoney) {
        this.pDMoney = pDMoney;
    }

    public Boolean getPDStatus() {
        return pDStatus;
    }

    public void setPDStatus(Boolean pDStatus) {
        this.pDStatus = pDStatus;
    }

    public UserRadioCab getUserRadioCab() {
        return userRadioCab;
    }

    public void setUserRadioCab(UserRadioCab userRadioCab) {
        this.userRadioCab = userRadioCab;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (paymentDetailID != null ? paymentDetailID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PaymentDetails)) {
            return false;
        }
        PaymentDetails other = (PaymentDetails) object;
        if ((this.paymentDetailID == null && other.paymentDetailID != null) || (this.paymentDetailID != null && !this.paymentDetailID.equals(other.paymentDetailID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.myapp.c0910g.entity.PaymentDetails[paymentDetailID=" + paymentDetailID + "]";
    }

}
